import React from "react";
import { HashRouter, Route, Switch } from "react-router-dom";

// 私有组件
import PrivateRouter from './components/privateRouter';

import Login from './views/login';
import Index from './views/index';

class App extends React.Component {
  constructor(props) {
    super(props);
    this.state = {};
  }
  render() {
    return (
      <HashRouter>
        <Switch>
          <Route path="/" render={ () => <Login /> } exact />
          <PrivateRouter component={ Index } path="/index" />
        </Switch> 
      </HashRouter>
    );
  }
}

export default App;
